package com.allwees.bs.c.module.order.service.impl;

import com.allwees.bs.c.module.order.dto.OrderLogisticsDTO;
import com.allwees.bs.c.module.order.entity.LogisticsWaybillEntity;
import com.allwees.bs.c.module.order.repository.LogisticsWaybillEntityRepository;
import com.allwees.bs.c.module.order.service.IOrderLogisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderLogisticsServiceImpl implements IOrderLogisticsService {
    @Autowired
    private LogisticsWaybillEntityRepository orderLogisticsRepository;

	@Override
	public OrderLogisticsDTO findByExpressCode(String expressCode) {
		LogisticsWaybillEntity orderLogisticEntity = orderLogisticsRepository.findByExpressCode(expressCode);
		return OrderLogisticsDTO.fromEntity(orderLogisticEntity);
	}
}
